-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/aws_kinesis_stream: Add Support enforce_consumer_deletion attribute #8682
r/aws_kinesis_stream: Add Support enforce_consumer_deletion attribute #8682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kterada0509 👋 Thanks for contributing this! 🚀 This was implemented well, especially with the new testing.
The only odd part about "virtual" attributes (ones that are Terraform-only or not available in the API, generally used for update/delete handling) is that they require a state migration to prevent a difference during the first Terraform plan where the provider has been upgraded, e.g. to prevent this difference in Terraform 0.11 for example:
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
~ aws_kinesis_stream.test
enforce_consumer_deletion: "" => "false"
Plan: 0 to add, 1 to change, 0 to destroy.
We have not even got to documenting the process for how this is now handled in version 0.12 of the Terraform Provider SDK yet though 😅 so spent some time this morning writing up a followup commit (42069b4) and testing it with "real" Terraform 0.11 and 0.12 environments. All good now and we'll get that documentation updated on the Terraform website shortly. 👍
Output from AWS Standard acceptance testing:
--- PASS: TestAccAWSKinesisStream_encryptionWithoutKmsKeyThrowsError (61.96s)
--- PASS: TestAccAWSKinesisStream_basic (73.32s)
--- PASS: TestAccAWSKinesisStream_enforceConsumerDeletion (73.70s)
--- PASS: TestAccAWSKinesisStream_importBasic (73.96s)
--- PASS: TestAccAWSKinesisStream_Tags (127.42s)
--- PASS: TestAccAWSKinesisStream_shardLevelMetrics (134.23s)
--- PASS: TestAccAWSKinesisStream_retentionPeriod (136.24s)
--- PASS: TestAccAWSKinesisStream_createMultipleConcurrentStreams (194.19s)
--- PASS: TestAccAWSKinesisStream_encryption (213.62s)
--- PASS: TestAccAWSKinesisStream_shardCount (265.32s)
Output from AWS GovCloud (US) acceptance testing:
--- PASS: TestAccAWSKinesisStream_encryptionWithoutKmsKeyThrowsError (61.96s)
--- PASS: TestAccAWSKinesisStream_basic (73.32s)
--- PASS: TestAccAWSKinesisStream_enforceConsumerDeletion (73.70s)
--- PASS: TestAccAWSKinesisStream_importBasic (73.96s)
--- PASS: TestAccAWSKinesisStream_Tags (127.42s)
--- PASS: TestAccAWSKinesisStream_shardLevelMetrics (134.23s)
--- PASS: TestAccAWSKinesisStream_retentionPeriod (136.24s)
--- PASS: TestAccAWSKinesisStream_createMultipleConcurrentStreams (194.19s)
--- PASS: TestAccAWSKinesisStream_encryption (213.62s)
--- PASS: TestAccAWSKinesisStream_shardCount (265.32s)
func testAccKinesisStreamConfigWithEnforceConsumerDeletion(rInt int) string { | ||
return fmt.Sprintf(` | ||
resource "aws_kinesis_stream" "test_stream" { | ||
name = "terraform-kinesis-test-%d" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: The whitespace here looks like tabs instead of spaces.
This has been released in version 2.12.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Fixes #8420
Release note for CHANGELOG:
Output from acceptance testing: